#ifndef _HCC_ERROR_CODE_DRV_HAL_COMMON_H_
#define _HCC_ERROR_CODE_DRV_HAL_COMMON_H_

#include "ofc_types.h"
#include "hcc_error_code.h"
#include "hcc_error_code_drv.h"

#ifdef __cplusplus
extern "C" {
#endif

// 不含行号的错误码生成
#define HCC_MAKE_DRV_HAL_COMMON_ERROR(error_code) (int)HCC_MAKE_DRIVER_ERROR(kHccDrvHalCommon, error_code, HCC_ERROR_LEVEL_ERROR)
// 含行号的错误码生成
#define HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(error_code) (int)HCC_ERROR(HCC_MAKE_DRIVER_ERROR(kHccDrvHalCommon, error_code, HCC_ERROR_LEVEL_ERROR))


/**
 * 抽象层公共错误码:抽象层公共错误码抽象层公共错误码
 */
enum THccDrvHalCommonTag
{
	kHccDrvHalCommonSuccess	=	HCC_ERROR_SUCCESS,			///< 成功,没有错误
	kHccDrvHalCommonParam	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(0),			///<参数错误
	kHccDrvHalCommonCallBack	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(1),			///<回调函数未设置
	kHccDrvHalCommonNoExist	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(2),			///<设备不存在
	kHccDrvHalCommonNotSupport	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(3),			///<类型不支持
	kHccDrvHalCommonOutOfRange	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(4),			///<超出范围
	kHccDrvHalCommonOpened	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(5),			///<设备已打开
	kHccDrvHalCommonClosed	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(6),			///<设备已关闭
	kHccDrvHalCommonBaudRate	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(7),			///<波特率不合法
	kHccDrvHalCommonFail	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(8),			///<操作失败
	kHccDrvHalCommonNotAligned	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(9),			///<边界未对齐
	kHccDrvHalCommonTimeout	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(10),			///<处理超时
	kHccDrvHalCommonNotReady	=	HCC_MAKE_DRV_HAL_COMMON_ERROR(11),			///<未准备好
};
typedef enum THccDrvHalCommonTag THccDrvHalCommon;


typedef Int32 THccDrvHalCommonLine;
#define kHccDrvHalCommonSuccessLine	HCC_ERROR_SUCCESS	///< 成功,没有错误
#define kHccDrvHalCommonParamLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(0)	///<参数错误
#define kHccDrvHalCommonCallBackLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(1)	///<回调函数未设置
#define kHccDrvHalCommonNoExistLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(2)	///<设备不存在
#define kHccDrvHalCommonNotSupportLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(3)	///<类型不支持
#define kHccDrvHalCommonOutOfRangeLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(4)	///<超出范围
#define kHccDrvHalCommonOpenedLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(5)	///<设备已打开
#define kHccDrvHalCommonClosedLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(6)	///<设备已关闭
#define kHccDrvHalCommonBaudRateLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(7)	///<波特率不合法
#define kHccDrvHalCommonFailLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(8)	///<操作失败
#define kHccDrvHalCommonNotAlignedLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(9)	///<边界未对齐
#define kHccDrvHalCommonTimeoutLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(10)	///<处理超时
#define kHccDrvHalCommonNotReadyLine	HCC_MAKE_DRV_HAL_COMMON_ERROR_LINE(11)	///<未准备好

#ifdef __cplusplus
}  // extern "C"
#endif

#endif // _HCC_ERROR_CODE_DRV_HAL_COMMON_H_
/**
 * @
 */
